{% extends "layout.html" %}

{%- block title -%}{{config.package.name|title}} - {{post.title}}{%- endblock -%}

{% block content %}
<article class="hentry">
  <h1 class="entry-title">{{post.title}}</h1>
  <div><a href="https://github.com/aralejs/aralejs.org/wiki/%E5%8E%86%E5%8F%B2%E8%AE%B0%E5%BD%95%E4%B9%A6%E5%86%99%E8%A7%84%E8%8C%83">书写规范</a></div>  
  <div class="entry-content">
    {{ post.html }}
  </div>
</article>
<script>
seajs.use('$', function($) {
    $('#content code').each(function(index, item) {
        item = $(item);
        var matcher = item.html().match(/^tag:(.+)/i);
        if (matcher) {
            item.parent().css('padding-left', '150px');
            item.replaceWith('<span class="history-tag history-tag-'+matcher[1]+'">'+matcher[1]+'</span>');
        }
    });
});
</script>
<style>
#content p {
    border-top: 1px dashed #CCCCCC;
    font-size: 16px;
    margin: 12px 0;
    padding: 12px 0 0 0;
    position: relative;
}
#content h2 {
    margin-top: 60px;
    font-family: Georgia;
    border-bottom: none;
}
</style>
{% endblock %}

{%- block subsidebar %}
<ul id="module-output">
  <li class="module-multiable" title="本组件共有{{config.package.spm.output|length}}个子模块">文件</li>
    {%- for value in config.package.spm.output %}
    <li><a data-file="{{value}}" href="dist/{{value}}">■</a></li>
    {%- endfor %}
</ul>
<div id="output-card">
    <h3>{{config.package.family}}/{{config.package.name}}/{{config.package.version}}/<a target="_blank" id="output-file"></a></h3>
    <p>这是模块的输出文件，请 require 或 link 来加载此文件。</p>
</div>
{%- endblock %}
